#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e6+7;
int main()
{
	string s;
	cin>>s;
	s=' '+s;
	for(int i=1;i<=16;i++)
	{
		if(i%2==0&&s[i]=='1')
		{
			cout<<"No";
			return 0;
		}	
	} 
	cout<<"Yes";
	return 0;
}
